[Main]
Name=Weather System
Author=Syphor Knight
D1=Version: 1.5.1
D2=This is a realtime weather system with day/night cycles, along with rain and possible thunder/lightning.
D3=All files and objects need to be present for everything to work correctly. All values for these can be changed in this wizard.
D4=Includes simple sound effect maker with support for different sounds day or night. Can be easily enough snipped out if you're uninterested in this feature.
D5=
D6=Usage: Cover the map with your darkness object, along with rain objects wherever you want them to appear when in the dream. This script will take care of converting as the dream runs.
D7=Adds commands to the dream, usable only by those with shared. Type !Commands to get a list.
D8=
D9=Please note: This script requires custom patches consisting of a Darkness block, three rain animation frames, and two blank, walkable objects. (For rain/darkness placeholders)
V1=Day/Night Length
T1=Hours of Day/Night (-1)
V2=Darkness Object
T2=Object #
V3=Darkness Placeholder
T3=Object #
V4=Rain Frame 1
T4=Object #
V5=Rain Frame 2
T5=Object #
V6=Rain Frame 3
T6=Object #
V7=Rain Placeholder
T7=Object #
V8=Lightning Timer
T8=Timer #
B8=1
V9=Thunder SFX
T9=Sound #
V10=Chance of Rain
T10=Percentage #
B10=30
V11=Rain Stop Chance
T11=Percentage #
B11=80
V12=Chance of Thundering
T12=Percentage #
B12=40
V13=Amount of Lightning
T13=Percentage #
B13=40
V14=Daylight Emit
T14=Emit Text
B14=The sun has risen, a new day has begun!
V15=Nighttime Emit
T15=Emit Text
B15=Night has fallen o'er the land...
V16=Minimum Time Between Sounds
T16=Minutes
V17=Chance of Making Sound
T17=Percentage #
V18=Day Sound 1
T18=Sound #
V19=Day Sound 2
T19=Sound #
V20=Day Sound 3
T20=Sound #
V21=Night Sound 1
T21=Sound #
V22=Night Sound 2
T22=Sound #
V23=Night Sound 3
T23=Sound #

[Code]
*Syphor's Weather Version 2
*Startup Configuration
(0:0) When everything is starting up,
*           How long (hours - 1) each day and night should be
            (5:300) set variable %wdaytime to the value ^1^.
*           Other variables
            (5:300) set variable %wrainon to the value 0.
            (5:300) set variable %wraincycle to the value 1.
            (5:300) set variable %wdarkon to the value 0.
            (5:300) set variable %wdarkcycle to the value 1.
            (5:300) set variable %wrainspeed to the value 2.
            (5:300) set variable %wthundering to the value 0.
            (5:300) set variable %wlightning to the value 0.
            (5:300) set variable %wsolarposition to the value 0.
            (5:5) change object type ^2^ to type ^3^.
            (5:5) change object type ^4^ to type ^7^.
*Ambient Counter
            (5:300) set variable %wambientnoise to the value 0.
            (5:300) set variable %wnoiseselect to the value 0.

*Command list
(0:31) When a furre says {!Commands},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
            (5:200) emit message {Commands list follows:} to whoever set off the trigger.
            (5:200) emit message {!Toggle commands: Dark, Rain, RainCycle, DarkCycle, Thunder} to whoever set off the trigger.
            (5:200) emit message {!Set commands: Rainspeed (!Set &lt;type&gt; ##)} to whoever set off the trigger.
            (5:200) emit message {!Status - Show current status of parts of the dream.} to whoever set off the trigger.

*Status Command
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
            (5:200) emit message {---Dream Status---} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wrainon is equal to 1,
            (5:200) emit message {Rain: On} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wrainon is equal to 0,
            (5:200) emit message {Rain: Off} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wraincycle is equal to 0,
            (5:200) emit message {Random Rain: Off} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wraincycle is equal to 1,
            (5:200) emit message {Random Rain: On} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
            (5:200) emit message {Current Rain Speed: %rainspeed } to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wdarkon is equal to 0,
            (5:200) emit message {Darkness: Off} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wdarkon is equal to 1,
            (5:200) emit message {Darkness: On} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wdarkcycle is equal to 0,
            (5:200) emit message {Daily Cycle: Off} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wdarkcycle is equal to 1,
            (5:200) emit message {Daily Cycle: On} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
            (5:301) copy the value of variable %wdaytime into variable %wstatus.
            (5:302) take variable %wstatus and add 1 to it.
            (5:200) emit message {Current Daily Cycle Timing: %wstatus hours.} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wthundering is equal to 0,
            (5:200) emit message {Thunder: Off} to whoever set off the trigger.
(0:31) When a furre says {!Status},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wthundering is equal to 1,
            (5:200) emit message {Thunder: On} to whoever set off the trigger.
*Animation
*Multispeed Rain
(0:100) When 1 seconds have passed, offset by 0,
   (1:200) and variable %wrainspeed is equal to 1,
            (5:400) Cycle the three object types in this sequence one step forward: ^4^, ^5^, ^6^.
(0:100) When 2 seconds have passed, offset by 0,
   (1:200) and variable %wrainspeed is equal to 2,
            (5:400) Cycle the three object types in this sequence one step forward: ^4^, ^5^, ^6^.
(0:100) When 3 seconds have passed, offset by 0,
   (1:200) and variable %wrainspeed is equal to 3,
            (5:400) Cycle the three object types in this sequence one step forward: ^4^, ^5^, ^6^.

*====Manual Dark====
(0:31) When a furre says {!Toggle Dark},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 1.
(0:31) When a furre says {!Toggle Dark},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wdarkon is equal to 0,
            (5:5) change object type ^3^ to type ^2^.
            (5:300) set variable %wdarkon to the value 1.
            (5:300) set variable %wcycletoggle to the value 0.
(0:31) When a furre says {!Toggle Dark},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wdarkon is equal to 1,
            (5:5) change object type ^2^ to type ^3^.
            (5:300) set variable %wdarkon to the value 0.
            (5:300) set variable %wcycletoggle to the value 0.
(0:31) When a furre says {!Toggle Dark},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 0.
*====Manual Rain====
(0:31) When a furre says {!Toggle Rain},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 1.
(0:31) When a furre says {!Toggle Rain},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1, *Removable
   (1:200) and variable %wrainon is equal to 0,
            (5:300) set variable %rainon to the value 1.
            (5:5) change object type ^7^ to type ^4^.
            (5:300) set variable %wcycletoggle to the value 0.
(0:31) When a furre says {!Toggle Rain},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wrainon is equal to 1,
            (5:300) set variable %wrainon to the value 0.
            (5:5) change object type ^4^ to type ^7^.
            (5:5) change object type ^5^ to type ^7^.
            (5:5) change object type ^6^ to type ^7^.
            (5:300) set variable %wcycletoggle to the value 0.
(0:31) When a furre says {!Toggle Rain},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 0.

*Manual Rainspeed
(0:32) When a furre says something with {!Set RainSpeed } in it,
   (1:11) and the triggering furre has got shared control (or is the dream owner),
            (5:314) set variable %wrainspeed to the number the triggering furre just said.
(0:32) When a furre says something with {!Set RainSpeed } in it,
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:202) and variable %wrainspeed is less than 1,
            (5:300) set variable %wrainspeed to the value 1.
(0:32) When a furre says something with {!Set RainSpeed } in it,
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:201) and variable %wrainspeed is greater than 3,
            (5:300) set variable %wrainspeed to the value 3.
(0:32) When a furre says something with {!Set RainSpeed } in it,
   (1:11) and the triggering furre has got shared control (or is the dream owner),
            (5:200) emit message {Rain speed now: %rainspeed } to whoever set off the trigger.

*====Random Rain On/Off====
(0:31) When a furre says {!Toggle RainCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 1.
(0:31) When a furre says {!Toggle RainCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wraincycle is equal to 1,
            (5:200) emit message {Rain Cycling Off} to whoever set off the trigger.
            (5:300) set variable %wcycletoggle to the value 0.
            (5:300) set variable %wraincycle to the value 0.
(0:31) When a furre says {!Toggle RainCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wraincycle is equal to 0,
            (5:200) emit message {Rain Cycling On} to whoever set off the trigger.
            (5:300) set variable %wcycletoggle to the value 0.
            (5:300) set variable %wraincycle to the value 1.
(0:31) When a furre says {!Toggle RainCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 0.
*====Daily Cycling On/Off====
(0:31) When a furre says {!Toggle DarkCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 1.
(0:31) When a furre says {!Toggle DarkCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wdarkcycle is equal to 1,
            (5:200) emit message {Night/Day Cycling Off} to whoever set off the trigger.
            (5:300) set variable %wcycletoggle to the value 0.
            (5:300) set variable %wdarkcycle to the value 0.
(0:31) When a furre says {!Toggle DarkCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wdarkcycle is equal to 0,
            (5:200) emit message {Night/Day Cycling On} to whoever set off the trigger.
            (5:300) set variable %wcycletoggle to the value 0.
            (5:300) set variable %wdarkcycle to the value 1.
(0:31) When a furre says {!Toggle DarkCycle},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 0.
*====Thunder On/Off====
(0:31) When a furre says {!Toggle Thunder},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 1.
(0:31) When a furre says {!Toggle Thunder},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wthundering is equal to 1,
            (5:200) emit message {Thunder Off} to whoever set off the trigger.
            (5:300) set variable %wcycletoggle to the value 0.
            (5:300) set variable %wthundering to the value 0.
(0:31) When a furre says {!Toggle Thunder},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
   (1:200) and variable %wcycletoggle is equal to 1,
   (1:200) and variable %wthundering is equal to 0,
            (5:200) emit message {Thunder On} to whoever set off the trigger.
            (5:300) set variable %wcycletoggle to the value 0.
            (5:300) set variable %wthundering to the value 1.
(0:31) When a furre says {!Toggle Thunder},
   (1:11) and the triggering furre has got shared control (or is the dream owner),
           (5:300) set variable %wcycletoggle to the value 0.
*====Random Rain On/Off====
(0:101) When the time is 99:0 FST
    (1:200) and variable %wraincycle is equal to 1,
            (5:300) set variable %wraincheck to the value 1.
(0:101) When the time is 99:0 FST
   (1:200) and variable %wraincheck is equal to 1, *Removable
   (1:201) and variable %wrainon is greater than 0,
   (1:1000) and a random dice roll comes up (^11^ percent of the time),
            (5:300) set variable %wraincheck to the value 0.
            (5:300) set variable %wrainon to the value 0.
            (5:5) change object type ^4^ to type ^7^.
            (5:5) change object type ^5^ to type ^7^.
            (5:5) change object type ^6^ to type ^7^.
(0:101) When the time is 99:0 FST
   (1:200) and variable %wraincheck is equal to 1,
   (1:200) and variable %wrainon is equal to 0,
   (1:1000) and a random dice roll comes up (^10^ percent of the time),
            (5:300) set variable %wraincheck to the value 0.
            (5:300) set variable %wrainon to the value 1.
            (5:5) change object type ^7^ to type ^4^.
(0:101) When the time is 99:0 FST
    (1:200) and variable %wraincycle is equal to 1,
            (5:300) set variable %wraincheck to the value 0.
*====Random Rain Speed and Thunder Yes/No====
(0:101) When the time is 99:0 FST
    (1:200) and variable %wraincycle is equal to 1,
    (1:200) and variable %wrainon is equal to 1,
            (5:312) set variable %wrainspeed to the total of rolling 1 dice with 3 sides plus 0.
            (5:300) set variable %wthundering to the value 0.
(0:101) When the time is 99:0 FST
    (1:200) and variable %wraincycle is equal to 1,
    (1:200) and variable %wrainon is equal to 1,
    (1:1000) and a random dice roll comes up (^12^ percent of the time),
            (5:300) set variable %wthundering to the value 1.
*====Random Thunder/Lightning====
(0:100) When 6 seconds have passed, offset by 0,
   (1:200) and variable %wthundering is equal to 1,
   (1:200) and variable %wrainon is equal to 1,
   (1:200) and variable %wlightning is equal to 0.
   (1:1000) and a random dice roll comes up (^13^ percent of the time),
           (5:5) change object type ^2^ to type ^3^.    (Brighten)
           (5:300) set variable %wlightning to the value 1.
           (5:12) play sound 100 to everyone on the map.
           (5:50) set countdown timer ^8^ to go off in 1 seconds.
(0:50) When countdown timer ^8^ goes off,
   (1:200) and variable %wdarkon is equal to 1,
           (5:5) change object type ^3^ to type ^2^.    (Darken)
           (5:300) set variable %wlightning to the value 0.
(0:50) When countdown timer ^8^ goes off,
   (1:200) and variable %wdarkon is equal to 0,
           (5:300) set variable %wlightning to the value 0.
*====Automatic Day/Night====
(0:101) When the time is 99:0 FST
    (1:200) and variable %wdarkcycle is equal to 1,
            (5:302) take variable %wsolarposition and add 1 to it.
            (5:300) set variable %wcycletoggle to the value 1.
(0:101) When the time is 99:0 FST
   (1:204) and variable %wsolarposition is greater than variable %wdaytime,
   (1:200) and variable %wdarkon is equal to 1,
   (1:200) and variable %wcycletoggle is equal to 1,
            (5:5) change object type ^2^ to type ^3^.
            (5:300) set variable %wdarkon to the value 0.
            (5:300) set variable %wsolarposition to the value 0.
            (5:204) emitloud message {^14^} to everyone on the map.
(0:101) When the time is 99:0 FST
   (1:204) and variable %wsolarposition is greater than variable %wdaytime,
   (1:200) and variable %wdarkon is equal to 0,
   (1:200) and variable %wcycletoggle is equal to 1,
            (5:5) change object type ^3^ to type ^2^.
            (5:300) set variable %wdarkon to the value 1.
            (5:300) set variable %wsolarposition to the value 0.
            (5:204) emitloud message {^15^} to everyone on the map.
(0:101) When the time is 99:0 FST
            (5:300) set variable %wcycletoggle to the value 0.

*====Weather Ambient Sound System====
(0:101) When the time is 99:99 FST
            (5:302) take variable %wambientnoise and add 1 to it.
(0:101) When the time is 99:99 FST
   (1:201) and variable %wambientnoise is greater than ^16^, (Number of Minutes-one between possible sounds)
   (1:1000) and a random dice roll comes up (^17^ percent of the time),  (How often it makes a sound every x minutes)
            (5:312) set variable %wnoiseselect to the total of rolling 1 dice with 3 sides plus 0. (sides = number of sound blocks) 
(0:101) When the time is 99:99 FST
   (1:201) and variable %wambientnoise is greater than ^16^, (Number of Minutes-one between possible sounds)
            (5:300) set variable %wambientnoise to the value 0.
*====Noise Blocks - Daytime====
(0:101) When the time is 99:99 FST
   (1:200) and variable %wnoiseselect is equal to 1,
   (1:200) and variable %wdarkon is equal to 0,
            (5:12) play sound ^18^ to everyone on the map.
(0:101) When the time is 99:99 FST
   (1:200) and variable %wnoiseselect is equal to 2,
   (1:200) and variable %wdarkon is equal to 0,
            (5:12) play sound ^19^ to everyone on the map.
(0:101) When the time is 99:99 FST
   (1:200) and variable %wnoiseselect is equal to 3,
   (1:200) and variable %wdarkon is equal to 0,
            (5:12) play sound ^20^ to everyone on the map.
*====Noise Blocks - Nighttime====
(0:101) When the time is 99:99 FST
   (1:200) and variable %wnoiseselect is equal to 1,
   (1:200) and variable %wdarkon is equal to 1,
            (5:12) play sound ^21^ to everyone on the map.
(0:101) When the time is 99:99 FST
   (1:200) and variable %wnoiseselect is equal to 2,
   (1:200) and variable %wdarkon is equal to 1,
            (5:12) play sound ^22^ to everyone on the map.
(0:101) When the time is 99:99 FST
   (1:200) and variable %wnoiseselect is equal to 3,
   (1:200) and variable %wdarkon is equal to 1,
            (5:12) play sound ^23^ to everyone on the map.
*====Sound System End====
(0:101) When the time is 99:99 FST
   (1:201) and variable %wnoiseselect is greater than 0,
            (5:300) set variable %wnoiseselect to the value 0.
